'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    ctx.body = 'hi, egg';
  }
  async types(){
      let {service,ctx} = this;
      let types = await service.home.types();
      ctx.body = {
          code:1,
          data:types
      }
  }
}

module.exports = HomeController;
